#include "app_message.h"
#include "log.h"



int main(int argc, char const *argv[])
{
     //生成一个json字符串 
     char *json_str = "{\"conn_type\":1,\"id\":\"5858\",\"msg\":\"61626364\"}";
     Message *message= app_message_json_to_message(json_str);
     char bytes_buff[100]={0};
     int bytes_len= app_message_message_to_bytes(message,bytes_buff,100);
     log_info("bytes_len:%d ,bytes_data:%.*s",bytes_len,bytes_len,bytes_buff);
    
    Message *message2=  app_message_bytes_to_message(bytes_buff,bytes_len);
    char *json= app_message_message_to_json(message2);
    log_info("json:%s",json);
    return 0;
}
